package com.bruce.practice.es.config;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author luotuan
 * @Description
 * @create 2020-04-23 14:32
 **/
@Configuration
@ConfigurationProperties(prefix = "elasticsearch.client")
public class ElsearchConfig {
    private String clusterName;
    private String hosts;
    private String name;
    private String password;

    public String getClusterName() {
        return clusterName;
    }

    public ElsearchConfig setClusterName(String clusterName) {
        this.clusterName = clusterName;
        return this;
    }

    public String getHosts() {
        return hosts;
    }

    public ElsearchConfig setHosts(String hosts) {
        this.hosts = hosts;
        return this;
    }

    public String getName() {
        return name;
    }

    public ElsearchConfig setName(String name) {
        this.name = name;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public ElsearchConfig setPassword(String password) {
        this.password = password;
        return this;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("clusterName", clusterName)
                .append("hosts", hosts)
                .toString();
    }
}
